package elm.view.impl;

import elm.dao.AdminDao;
import elm.dao.impl.AdminDaoImpl;
import elm.pojo.Admin;
import elm.view.AdminView;

import java.util.Scanner;

public class AdminViewImpl implements AdminView {

    @Override
    public Admin login() {
        AdminDao adminDao = new AdminDaoImpl();
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入管理者名称：");
        String adminName = scanner.nextLine();
        System.out.println("请输入登录密码：");
        String password = scanner.next();

        return adminDao.login(adminName,password);
    }
}
